﻿
Imports Newtonsoft.Json

''' <summary>
''' 模型对象
''' </summary>
Public Class Model

    ''' <summary>
    ''' 返回的对象类型
    ''' </summary>
    ''' <returns></returns>
    <JsonProperty("object")>
    Public Property [Object] As String

    ''' <summary>
    ''' 模型数据
    ''' </summary>
    ''' <returns></returns>
    <JsonProperty("data")>
    Public Property Data As List(Of DataType)

    ''' <summary>
    ''' 模型数据
    ''' </summary>
    Public Class DataType

        ''' <summary>
        '''  Unix 时间戳（以秒为单位）。
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("created")>
        Public Property Created As Integer

        ''' <summary>
        ''' 模型ID
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("id")>
        Public Property Id As String

        ''' <summary>
        ''' 对象-固定model
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("object")>
        Public Property [Object] As String

        ''' <summary>
        ''' 所属组织
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("owned_by")>
        Public Property OwnedBy As String

        ''' <summary>
        ''' 权限信息
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("permission")>
        Public Property Permission As List(Of PermissionType)

        ''' <summary>
        ''' 根
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("root")>
        Public Property Root As String

        ''' <summary>
        ''' 父关联
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("parent")>
        Public Property Parent As String

    End Class

    ''' <summary>
    ''' 权限信息
    ''' </summary>
    Public Class PermissionType

        ''' <summary>
        ''' Unix 时间戳（以秒为单位）。
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("created")>
        Public Property Created As Integer

        ''' <summary>
        ''' 权限id
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("id")>
        Public Property Id As String

        ''' <summary>
        ''' 对象
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("object")>
        Public Property [Object] As String

        ''' <summary>
        ''' 组织
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("organization")>
        Public Property Organization As String

        ''' <summary>
        ''' 分组
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("group")>
        Public Property Group As String

        ''' <summary>
        ''' 块
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("is_blocking")>
        Public Property IsBlocking As Boolean

    End Class

End Class
